package com.pzb.common.core.domain.entity;

import com.pzb.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 图片管理对象 pic_file
 * 
 * @author pzb
 * @date 2021-09-10
 */
public class PicFile extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 商家id */
    private String extAppid;

    /** 父级id */
    private Long parentId;

    /** 祖籍列表 */
    private String ancestors;

    /** 文件名称 */
    private String fileName;

    /** 存储文件路径 */
    private String filePath;

    /** 缩略图路径 */
    private String previewPath;

    /** 文件或文件夹，0为文件夹，1 为图片，2为视频 */
    private Integer type;

    /** 文件后缀，如图片的jpg、png，视频的MP4 */
    private String suffix;

    /** 图片或视频宽度 */
    private Integer width;

    /** 图片或视频高度 */
    private Integer height;

    /** 文件大小，单位是KB */
    private Long size;

    /** 父节点名称 */
    private String parentName;

    /** 子节点 */
    private List<PicFile> children = new ArrayList<PicFile>();

    /** 移动的文件的文件 */
    private Long[] ids;

    /** 父级id列表 */
    private List<Long> parentIds;

    /** 父级id列表 */
    private Boolean usable;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setExtAppid(String extAppid)
    {
        this.extAppid = extAppid;
    }

    public String getExtAppid()
    {
        return extAppid;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setAncestors(String ancestors) 
    {
        this.ancestors = ancestors;
    }

    public String getAncestors() 
    {
        return ancestors;
    }
    public void setFileName(String fileName) 
    {
        this.fileName = fileName;
    }

    public String getFileName() 
    {
        return fileName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getPreviewPath() {
        return previewPath;
    }

    public void setPreviewPath(String previewPath) {
        this.previewPath = previewPath;
    }

    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setSuffix(String suffix) 
    {
        this.suffix = suffix;
    }

    public String getSuffix() 
    {
        return suffix;
    }
    public void setWidth(Integer width) 
    {
        this.width = width;
    }

    public Integer getWidth() 
    {
        return width;
    }
    public void setHeight(Integer height) 
    {
        this.height = height;
    }

    public Integer getHeight() 
    {
        return height;
    }
    public void setSize(Long size)
    {
        this.size = size;
    }

    public Long getSize()
    {
        return size;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<PicFile> getChildren() {
        return children;
    }

    public void setChildren(List<PicFile> children) {
        this.children = children;
    }

    public Long[] getIds() {
        return ids;
    }

    public void setIds(Long[] ids) {
        this.ids = ids;
    }

    public List<Long> getParentIds() {
        return parentIds;
    }

    public void setParentIds(List<Long> parentIds) {
        this.parentIds = parentIds;
    }

    public Boolean getUsable() {
        return usable;
    }

    public void setUsable(Boolean usable) {
        this.usable = usable;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("extAppid", getExtAppid())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("fileName", getFileName())
            .append("filePath", getFilePath())
            .append("previewPath", getPreviewPath())
            .append("type", getType())
            .append("suffix", getSuffix())
            .append("width", getWidth())
            .append("height", getHeight())
            .append("size", getSize())
            .toString();
    }
}
